package com.shiro.shiroforadmin.config;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class TokenConfig {

    //定义跳过token验证的注解
    @Target({ElementType.METHOD, ElementType.TYPE})
    @Retention(RetentionPolicy.RUNTIME)
    public @interface PassToken{
        boolean required() default true;
    }

    //定义需要Token验证的注解
    @Target({ElementType.METHOD, ElementType.TYPE})
    @Retention(RetentionPolicy.RUNTIME)
    public @interface UserLoginToken{
        boolean required() default true;
    }


    //定义需要Token验证且需要权限的注解
    @Target({ElementType.METHOD, ElementType.TYPE})
    @Retention(RetentionPolicy.RUNTIME)
    public @interface UserLoginTokenAndPerm{
        boolean required() default true;
        String[] role() default {};
        String perm() default "";
    }


}
